
#import "UIView+SMGradient.h"
@implementation UIView (SMGradient)
- (void)sm_applySoftGradientFrom:(UIColor *)fromColor to:(UIColor *)toColor {
    CAGradientLayer *g = [CAGradientLayer layer];
    g.colors = @[(id)fromColor.CGColor, (id)toColor.CGColor];
    g.startPoint = CGPointMake(0, 0);
    g.endPoint   = CGPointMake(1, 1);
    g.frame = self.bounds;
    g.name  = @"sm.soft.gradient";
    [self.layer insertSublayer:g atIndex:0];
}
@end
